﻿using System;
class Rect
{
    public double Width { get; set; }
    public double Height { get; set; }

    public Rect(double width, double height)
    {
        Width = width;
        Height = height;
    }

    public Rect()
    {
        Width = 10;
        Height = 10;
    }

    public double Area()
    {
        return Width * Height;
    }

    public double Perimeter()
    {
        return 2 * (Width + Height);
    }
}
class PlainRect : Rect
{
    
    public double StartX { get; set; }
    public double StartY { get; set; }

    public PlainRect(double startX, double startY, double width, double height)
    {
        StartX = startX;
        StartY = startY;
        Width = width;
        Height = height;
    }

    public PlainRect()
    {
        StartX = 0;
        StartY = 0;
        Width = 0;
        Height = 0;
    }

    public bool IsInside(double x, double y)
    {
        return x >= StartX && x <= StartX + Width && y >= StartY && y <= StartY + Height;
    }
}

class Program
{
    static void Main(string[] args)
    {
        PlainRect rect = new PlainRect(10, 10, 20, 10);
        double area = rect.Area();
        double perimeter = rect.Perimeter();
        Console.WriteLine("矩形的面积为：" + area);
        Console.WriteLine("矩形的周长为：" + perimeter);
        bool isInside = rect.IsInside(25.5, 13);
        if (isInside)
        {
            Console.WriteLine("点(25.5, 13)在矩形内");
        }
        else
        {
            Console.WriteLine("点(25.5, 13)不在矩形内");
        }
    }
}
